package logic

import (
	"context"
	"shop_srv/internal/svc"
	"shop_srv/models"
	"shop_srv/shop"

	"github.com/zeromicro/go-zero/core/logx"
)

type RealNameAuthLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewRealNameAuthLogic(ctx context.Context, svcCtx *svc.ServiceContext) *RealNameAuthLogic {
	return &RealNameAuthLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

func (l *RealNameAuthLogic) RealNameAuth(in *shop.RealNameAuthRequest) (*shop.RealNameAuthResponse, error) {
	// todo: add your logic here and delete this line

	var err error
	var s models.Shop
	var sr models.ShopRealName

	if err = s.GetShopByID(in.ShopId); err != nil {

	}
	if s.ID == 0 {

	}

	sr.RealName = in.GetRealName()
	sr.IdCard = in.IdCard
	return &shop.RealNameAuthResponse{}, nil
}
